Skip to content

improved missing pref messaging#710

Open
SharonStrats wants to merge 5 commits intomainfrom
fix/pref-file
Open

improved missing pref messaging#710
SharonStrats wants to merge 5 commits intomainfrom
fix/pref-file

Conversation

@SharonStrats
Copy link
Contributor

@SharonStrats SharonStrats commented Mar 15, 2026

Ticket #464

I followed the note from Tim in the meeting notes. Instead of offering to create the preference file I just improved the messaging. After reading again I thought I should also implement offering to create the pref file.

Let me know what you think. I can change it.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates login/profile/preference loading flows to improve error messaging when preferences can’t be fetched (not logged in / forbidden / missing), addressing SolidOS issue #464 about confusing “Unable to fetch your preferences” logs.

Changes:

  • Added a formatDynamicError() helper to produce more informative, contextual error strings.
  • Updated ensureLoadedPreferences() to short-circuit when not logged in and to persist clearer preferencesFileError messages for several failure modes (including 404).
  • Updated ensureLoadedProfile() and getUserRoles() to use the formatted error messaging and reduce noisy stack traces.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

SharonStrats and others added 2 commits March 16, 2026 07:15
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@timea-solid
Copy link
Member

@bourgeoa what is your opinion on this: should a pref file be created?

@bourgeoa
Copy link
Contributor

bourgeoa commented Mar 16, 2026

@timea-solid @SharonStrats
We are in follow your nose approach
It was decided that mashlib needed type indexes and they are created in solid-logic if missing.

Creating a preferences file needs to add a triple in WebID and reference the typeIndex files in the preferences file. This process is not an owner choice.

The owner refusal is not stored and he will be asked again and again.
As for now I don't see a reason to ask owner.

@SharonStrats
Copy link
Contributor Author

SharonStrats commented Mar 17, 2026

@bourgeoa I found this for the prefs.ttl file https://github.com/nodeSolidServer/node-solid-server/blob/2caddca5204be89dc434094a08f0f146a61b2efd/default-templates/new-account/settings/prefs.ttl#L4
And I see the triple for the WebID.

Do I assume that if they don't have a preferences file that they also don't have public and private type index? Or do I also need to look for these and create them if they don't exist? If they do exist write those paths in the prefs.ttl file.

I had a go at creating the file and adding the row to webID in this PR, but I didn't look for or create the public/private indexes yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants